/*
 * ClassificationList.java
 *
 * Created on December 5, 2006, 11:55 AM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package com.asaga.tools;
import java.io.Serializable;
import java.util.*;
import java.sql.*;
import org.apache.tools.ant.taskdefs.Java;

/**
 *
 * @author jeremys
 */
public class ClassificationList {
    private ArrayList classification;
    private JeremyDBConnectObj jdbcn;
    private Connection conn;
    
    /** Creates a new instance of ClassificationList */
    public ClassificationList() {
        classification = new ArrayList();
        jdbcn = new JeremyDBConnectObj();
        conn = jdbcn.getConnection();
        Statement statement = null;
        ResultSet rs = null;
        String query = "select * from classification";
        try {
            statement = conn.createStatement();
            rs = statement.executeQuery(query);
            while(rs.next()){
                classification.add(rs.getString("name"));                
            }
        } catch (SQLException ex) {
            classification.add(ex.toString());
            ex.printStackTrace();
        }
    }
    
    public ArrayList getClassification(){return this.classification;}
 
}
